1. Field of the Invention
The present invention generally relates to computer software. More specifically, the present invention relates to a method and system for aligning and laying out drawing elements in CAD drawings.
2. Description of the Related Art
The term computer-aided design (CAD) generally refers to a broad variety of computer-based tools used by architects, engineers, and other construction and design professionals. In the development of residential and commercial building designs, one common and time-consuming task is the layout of drawing elements representing electrical devices and light fixtures, in a CAD drawing. Specifically, drawing elements representing these objects need to be positioned in specific ways relative to other elements in the CAD drawing in order for the CAD drawing to correctly represent the design of a building. Examples of the other drawing elements include lines, arcs, walls, and ceiling grids. Further, the design of the building may also need to conform to various building standards or building codes, and the positioning of the drawing elements needs to satisfy any such requirements. Using existing CAD programs, design professionals are burdened with having to manually perform certain steps, which are further discussed in subsequent paragraphs, to individually layout and orient each of the drawing elements. In addition, if the boundaries of the objects are not straight lines but instead are, for instance, curved lines, then even more steps are needed to achieve proper alignment of the drawing elements representing electrical devices.
To illustrate, FIG. 1A and FIG. 1B are schematic diagrams setting forth prior art approaches of adding and placing a drawing element representation of a receptacle in a CAD drawing. In particular, FIG. IA shows the placing of a receptacle 110 at a point A in a viewing screen 100, which displays a part of a CAD drawing. The viewing screen 100 includes a wall 120, which has a straight section 120-1 and a curved section 120-2. In a prior art CAD program, adding and placing the receptacle 110 at the point A requires a user of the program to perform these following steps: (1) select the receptacle 110, and then (2) direct it to the point A on the straight section 120-1. If the user intends to align the receptacle 110 perpendicularly to the straight section 120-1, then the user needs to perform additional steps of specifying a right angle and invoking a function to rotate the receptacle 110 ninety (90) degrees in a clockwise manner. Alternatively, via the graphical user interface of the prior art CAD program, the user can manually rotate the receptacle 110, visually determine whether the intended orientation for the receptacle 110 is achieved, and repeat the rotation and visual determination steps until the desired results are reached.
Further complicating the process, if the user instead intends to place the receptacle 110 at a point B on the curved section 120-2, as shown in FIG.1 B, and align the receptacle 110 perpendicularly to the curved section 120-2, then the user will be required to perform some additional steps. In this context, aligning the receptacle 110 perpendicularly to the curved section 120-2 at the point B means aligning the receptacle 110 perpendicularly to a tangent line 130. Using the prior art CAD program, the user has to either manually identify the appropriate angle to rotate the receptacle 110 by or manually rotate the receptacle based on visual inspection. To illustrate, suppose an angle θ is the angle between the initial placement of the receptacle 110 at the point B and the tangent line 130. In one approach, the user relies on the functions supported by the prior art CAD program to identify the angle θ, calculate the difference between the angle θ and ninety (90) degrees, and then rotate the receptacle 110 by this difference in a counter-clock wise manner. In another approach, the user may interact with the graphical user interface of the prior art CAD program to iteratively rotate the receptacle 110 from its initial position until the user visually determines that the intended alignment has been achieved.
As has been demonstrated, the prior art CAD program requires its user to perform certain operations manually to add, place, and align a drawing element. If a CAD drawing includes more drawing elements, then more manual operations are required. As the number of manual operations increases, the results become less consistent and precise. FIG. 2 is a schematic diagram of prior art approaches of adding, placing, and aligning four receptacles in a viewing screen 200 of a CAD drawing. The four receptacles 211, 212, 213, and 214 are placed at points B21, B22, B23, and B24 on the curved section 220-2 of a wall 220. Here, using the prior art CAD program, a user must perform the steps detailed above four times. Repeating the manual operations multiple times invites errors and inefficiencies.
Moreover, because the prior art CAD program does not enforce or check how the drawing elements are laid out pursuant to any construction standards (e.g., a regulation specifying maximum permissible distance between two electrical devices), design professionals also need to manually verify and potentially modify the resulting layout. Referring again to FIG. 2, the intervals between two neighboring receptacles are d21, d22, and d23. Using the prior art CAD program, a user places one receptacle at a time (e.g., the receptacle 211), designates the interval (e.g., d21) to place the next receptacle (e.g., the receptacle 212), and places the next receptacle. If the user is unaware of the maximum permissible distance between the two receptacles as specified by some applicable building standard or code, the initially specified interval d21 may need to be subsequently modified to conform to such standards. Also, because the four receptacles are placed on the curved section 220-2 and not on a straight section (e.g., section 220-1), the user has to rely on functions supported by the prior art CAD program to either calculate the distance of each interval or estimate the distance by visual inspection.
As the foregoing illustrates, there is a need in the art to provide a method and system for automatically aligning and laying out drawing elements in a CAD drawing that is more efficient and precise than prior art techniques.